/*
 * Created on Jun 30, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.peterrussell.contractionTimer.model;

/**
 * @author peterr
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

public class ContractionTimeDTO {

	/**
	 * 
	 */
	protected ContractionTimeDTO() {
	}
	private long contractionTime;
	private long contractionTimeAvg;
	private long contractionTimeAvgOf;
	private long betweenContractionTime;
	private long betweenContractionTimeAvg;
	private long betweenContractionTimeAvgOf;
	private Integer index;
	
	/**
	 * @return Returns the betweenContractionTime.
	 */
	public long getBetweenContractionTime() {
		return betweenContractionTime;
	}
	/**
	 * @param betweenContractionTime The betweenContractionTime to set.
	 */
	public void setBetweenContractionTime(long betweenContractionTime) {
		this.betweenContractionTime = betweenContractionTime;
	}
	/**
	 * @return Returns the contractionTime.
	 */
	public long getContractionTime() {
		return contractionTime;
	}
	/**
	 * @param contractionTime The contractionTime to set.
	 */
	public void setContractionTime(long contractionTime) {
		this.contractionTime = contractionTime;
	}
	/**
	 * @return Returns the index.
	 */
	public int getIndex() {
		return index.intValue();
	}
	/**
	 * @param index The index to set.
	 */
	protected void setIndex(int index) {
		this.index = new Integer(index);
	}
	/**
	 * @param index The index to set.
	 */
	public boolean isNew() {
		return (index == null);
	}
	
	public void clear() {
		index = null;
		contractionTime = 0;
		betweenContractionTime = 0;
	}
	/**
	 * @return Returns the betweenContractionTimeAvg.
	 */
	public long getBetweenContractionTimeAvg() {
		return betweenContractionTimeAvg;
	}
	/**
	 * @param betweenContractionTimeAvg The betweenContractionTimeAvg to set.
	 */
	public void setBetweenContractionTimeAvg(long betweenContractionTimeAvg) {
		this.betweenContractionTimeAvg = betweenContractionTimeAvg;
	}
	/**
	 * @return Returns the betweenContractionTimeAvgOf.
	 */
	public long getBetweenContractionTimeAvgOf() {
		return betweenContractionTimeAvgOf;
	}
	/**
	 * @param betweenContractionTimeAvgOf The betweenContractionTimeAvgOf to set.
	 */
	public void setBetweenContractionTimeAvgOf(long betweenContractionTimeAvgOf) {
		this.betweenContractionTimeAvgOf = betweenContractionTimeAvgOf;
	}
	/**
	 * @return Returns the contractionTimeAvg.
	 */
	public long getContractionTimeAvg() {
		return contractionTimeAvg;
	}
	/**
	 * @param contractionTimeAvg The contractionTimeAvg to set.
	 */
	public void setContractionTimeAvg(long contractionTimeAvg) {
		this.contractionTimeAvg = contractionTimeAvg;
	}
	/**
	 * @return Returns the contractionTimeAvgOf.
	 */
	public long getContractionTimeAvgOf() {
		return contractionTimeAvgOf;
	}
	/**
	 * @param contractionTimeAvgOf The contractionTimeAvgOf to set.
	 */
	public void setContractionTimeAvgOf(long contractionTimeAvgOf) {
		this.contractionTimeAvgOf = contractionTimeAvgOf;
	}
	
	public String toString() {
		String rtn = "";
		rtn = rtn+"betweenContractionTime:"+betweenContractionTime+"\n";
		rtn = rtn+"betweenContractionTimeAvg:"+betweenContractionTimeAvg+"\n";
		rtn = rtn+"betweenContractionTimeAvgOf:"+ betweenContractionTimeAvgOf+"\n";
		rtn = rtn+"contractionTime:"+ contractionTime+"\n";
		rtn = rtn+"contractionTimeAvg:"+ contractionTimeAvg+"\n";
		
		
		return rtn;
	}
}
